# -*- mode: snippet -*-
# name: mle2 from bbmle Fit a Negative Binomial Generalized Linear Model
# key: mle2.negbin@bbmle
# --
$0 <- bbmle::mle2(
  ${1:resp} ~ dnbinom(mu = exp(logmu), size = exp(logtheta)),
  parameters = list(logmu ~ ${2:formula + offset()}),
  start = list(logmu = 0, logtheta = 0)
  data = ${3:dt},
  control = list(trace = 1)
)
